<?php
/**
* 这个是注册功能的控制器
*/
class ControllerZhuce extends GetLoad
{
	
	public function zhuce(){
		$this->load("Model/zhuce");

		$zhucem = new ModelZhuce();

		if(isset($_POST['name2'])){
			$a=$_POST['name2'];
			for($i=1;$zhucem->jiance($a);$i++){

					$a=$a.$i;
				

			}
		

			$data = array(
				'name' =>$a,
				'password'=>$_POST['password'],
				'zhucema'=>$_POST['yaoqingma'],
				'shoujihao'=>$_POST['shoujihao']
				 );
			$zhucem->wangchengzhuce($data);
			$this->view("view/zhucechenggong",$data);
	

		}else{
			$this->view("view/zhuce");
		}
	}
}